package session

import (
	"OnlineRetailers/models"
	"github.com/garyburd/redigo/redis"
)

func ExistSession(session string) (exist bool, err error) {

	conn := models.Pool.Get()

	defer func() {
		err = conn.Close()
		if err != nil {

		}
	}()

	return redis.Bool(conn.Do("EXISTS", session))

}
